]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/test-theme: Rename theme context variable
authorJonas Ådahl <jadahl@gmail.com>
Thu, 6 May 2021 21:16:31 +0000 (23:16 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 15 Jul 2021 12:42:17 +0000 (12:42 +0000)
We will later get a pointer to a MetaContext, so avoid that future
naming conflict.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1840>

src/st/test-theme.c

index 1d7bf517db99f28cc56021f5848e96b31b07c0f9..cbc79f6b50c088ea868faeef7c4dc10ff473bde7 100644 (file)
@@ -540,7 +540,7 @@ main (int argc, char **argv)
 {
   MetaBackend *backend;
   StTheme *theme;
-  StThemeContext *context;
+  StThemeContext *theme_context;
   PangoFontDescription *font_desc;
   GFile *file;
   g_autofree char *cwd = NULL;
@@ -564,36 +564,36 @@ main (int argc, char **argv)
 
   backend = meta_get_backend ();
   stage = meta_backend_get_stage (backend);
-  context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
-  st_theme_context_set_theme (context, theme);
+  theme_context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
+  st_theme_context_set_theme (theme_context, theme);
 
   font_desc = pango_font_description_from_string ("sans-serif 12");
-  st_theme_context_set_font (context, font_desc);
+  st_theme_context_set_font (theme_context, font_desc);
   pango_font_description_free (font_desc);
 
-  root = st_theme_context_get_root_node (context);
-  group1 = st_theme_node_new (context, root, NULL,
+  root = st_theme_context_get_root_node (theme_context);
+  group1 = st_theme_node_new (theme_context, root, NULL,
                               CLUTTER_TYPE_ACTOR, "group1", NULL, NULL, NULL);
-  text1 = st_theme_node_new  (context, group1, NULL,
+  text1 = st_theme_node_new  (theme_context, group1, NULL,
                               CLUTTER_TYPE_TEXT, "text1", "special-text", NULL, NULL);
-  text2 = st_theme_node_new  (context, group1, NULL,
+  text2 = st_theme_node_new  (theme_context, group1, NULL,
                               CLUTTER_TYPE_TEXT, "text2", NULL, NULL, NULL);
-  group2 = st_theme_node_new (context, root, NULL,
+  group2 = st_theme_node_new (theme_context, root, NULL,
                               CLUTTER_TYPE_ACTOR, "group2", NULL, NULL, NULL);
-  group4 = st_theme_node_new (context, root, NULL,
+  group4 = st_theme_node_new (theme_context, root, NULL,
                               CLUTTER_TYPE_ACTOR, "group4", NULL, NULL, NULL);
-  group5 = st_theme_node_new (context, root, NULL,
+  group5 = st_theme_node_new (theme_context, root, NULL,
                               CLUTTER_TYPE_ACTOR, "group5", NULL, NULL, NULL);
-  group6 = st_theme_node_new (context, root, NULL,
+  group6 = st_theme_node_new (theme_context, root, NULL,
                               CLUTTER_TYPE_ACTOR, "group6", NULL, NULL, NULL);
-  text3 = st_theme_node_new  (context, group2, NULL,
+  text3 = st_theme_node_new  (theme_context, group2, NULL,
                               CLUTTER_TYPE_TEXT, "text3", NULL, NULL,
                               "color: #0000ff; padding-bottom: 12px;");
-  text4 = st_theme_node_new  (context, group2, NULL,
+  text4 = st_theme_node_new  (theme_context, group2, NULL,
                               CLUTTER_TYPE_TEXT, "text4", NULL, "visited hover", NULL);
-  group3 = st_theme_node_new (context, group2, NULL,
+  group3 = st_theme_node_new (theme_context, group2, NULL,
                               CLUTTER_TYPE_ACTOR, "group3", NULL, "hover", NULL);
-  button = st_theme_node_new (context, root, NULL,
+  button = st_theme_node_new (theme_context, root, NULL,
                               ST_TYPE_BUTTON, "button", NULL, NULL, NULL);
 
   test_defaults ();